﻿using BaseAPI;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace MemorySiteServer.Models
{
    public class Role : BaseEntity
    {
        /// <summary>
        /// 角色名称
        /// </summary>
        [Required]
        [MaxLength(20)]
        public string Name { get; set; }
        /// <summary>
        /// 权限等级，数字越低权限越高
        /// </summary>
        public int Level { get; set; }
        /// <summary>
        /// 角色所拥有的权限
        /// </summary>
        public virtual List<RolePermission> RolePermissions { get; set; }
    }
}
